package org.yenn.pattern.aliyun.behavioral.interpreter.impl;

import lombok.AllArgsConstructor;
import lombok.ToString;
import org.yenn.pattern.aliyun.behavioral.interpreter.Expression;

/**
 * 步骤 2
 * 创建实现了上述接口的实体类。
 */
@AllArgsConstructor
@ToString
public class TerminalExpression implements Expression {

    private String data;


    @Override
    public boolean interpret(String context) {
        if(context.contains(data)){
            return true;
        }
        return false;
    }
}
